MS Word Functions Library Objects
See Using the Microsoft Office Library.
From version 7.2, there are new MS Word table library functions.
Function / Event |
Return Value |
Description |
Syntax |
Add Table Last Row |
None |
Adds a new row to the end of the specified table in the Word document. This function was added in version 7.2. |
Add a last row with <Select Number of Cells> cells in Table <Select Table Index> of <Select Document Name> document |
Add Textuals To The Beginning Of A Word Document |
--- |
Adds the text items from the specified List of Text to the beginning of the specified Word document by its full path and saves it. |
Add To The Beginning Of <Word Document To Open> And Save |
Add Textuals To The Beginning Of A Word Document And Save |
--- |
Adds the text items from the specified List of Text to the beginning of the specified Word document by its full path and saves it in a specified target Word document. The target document should be specified by path and name without format. It is saved in wdFormatDocument (*.doc). For example, if the target document is specified as C:\Temp\Office\Test, the document is saved as Test.doc under the specified folder. |
Add To The Beginning Of <Word Document To Open> And Save Under <Word Document To Save> |
Add Textuals To The Beginning Of A Word Document And Save In A Specific Format |
--- |
Adds the text items from the specified List of Text to the beginning of the specified Word document by its full path and saves it in a specified target Word document in a specified format. The target document should be specified by its full path without format in the wordDocumentToSave parameter. Format should be specified in wordDocumentSaveFormat according to Microsoft WdSaveFormat enumeration. (This link was active at the time of this publication. It is not maintained by NICE.) If the specified format is not supported (for example, wdFormatDocumentDefault is DOCX for Microsoft Office Word 2007 - 2016), the document is saved in DOC format by default. |
Add To The Beginning Of <Word Document To Open> And Save Under <Word Document To Save> In Format <Word Document Save Format> |
Clear Table Content |
None |
Clears the content of the specified table in the Word document. This function was added in version 7.2. |
Clear content of Table <Select Table Index> in <Select Document Name> document |
Delete Table |
None |
Deletes the specified table in the Word document. This function was added in version 7.2. |
Delete Table <Select Table Index> in <Select Document Name> document |
Delete Table Row |
None |
Deletes the specified row in the given table in the Word document. This function was added in version 7.2. |
Delete the row <Select Row Index> in Table <Select Table Index> of <Select Document Name> document |
Get Active Document Name |
Text |
Retrieves the name of an active Word document. This function able enables you to get the information from a Word form. See Using the Microsoft Word Form Capability. |
Get Active Document Name |
Get Document Field Value
|
Text |
Retrieves the value of a specified form field from a specified Word document. The document must be open before running this function. In the Document Name parameter, specify the name of the document (without a path) as it appears in the title bar of MS Word. For example, if the title is WordFormSample.docx [Compatibility Mode] – Word, then specify WordFormSample.docx [Compatibility Mode] in the parameter. To get form field names, run the Get Document Fields Name function and then use the returned field names in the Field Name parameter. |
Get Document <Document Name> Field <Field Name> Value |
Get Document Fields Name |
List of Text |
Retrieves the names of all the form fields from a Word document. The document must be open before running this function. In the Document Name parameter, specify the name of the document (without a path) as it appears in the title bar of MS Word. For example, if the title is WordFormSample.docx [Compatibility Mode] – Word, specify WordFormSample.docx [Compatibility Mode] in the parameter. |
Get Document <Document Name> Fields Name |
Get Document Text |
Text |
Retrieves the text from a specified Word document. Document Name is the complete path of the file, including extension. Example: C:\temp\MyFile.docx. |
Get Document <Document Name> Text |
Get Documents Names |
List of Text |
Retrieves a list of Word document names that are currently open. |
Get Document Names |
Get Table Cell Text |
Text |
Gets text from the specified cell in the table of the Word document. This function was added in version 7.2. |
Get cell text at row <Select Row Index> and column <Select Column Index> in Table <Select Table Index> of <Select Document Name> document |
Get Table Cells Count in Row |
Number |
Gets the number of cells in the specified row in the table of the Word document. This function was added in version 7.2. |
Get cell count in a row <Select Row Index> in Table <Select Table Index> of <Select Document Name> document |
Get Table Content |
List of Row |
Returns a collection of rows that represents the content of the table in the Word document. This function was added in version 7.2. |
Get content of Table <Select Table Index> of <Select Document Name> document |
Get Table Rows Count |
Number
|
Gets the number of rows in the specified table in the Word document. This function was added in version 7.2. |
Get rows count in Table <Select Table Index> of <Select Document Name> document |
Get Tables Count |
Number |
Gets a count of the tables in the Word document. This function was added in version 7.2. |
Get tables count in <Select Document Name> document |
Insert Table Row Above |
None |
Inserts a new row with the specified number of cells above the existing row in the table of the Word document. This function was added in version 7.2. |
Insert a row above the <Select Row Index> row with <Select Number of Cells> cells in Table <Select Table Index> of <Select Document Name> document |
Insert Table Row Below |
None |
Inserts a new row with the specified number of cells below the existing row in the table of the Word document. This function was added in version 7.2. |
Insert a row below the <Select Row Index> row with <Select Number of Cells> cells in Table <Select Table Index> of <Select Document Name> document |
Replace Text in Active Word Document |
Number |
Searches for the specified text in the active Word document and replaces it with the given text. |
Replace Text in Active Word Document <Find What> <Replace With> |
Set Table Cell Text |
None |
Sets text into the specified cell in the table of the Word document. This function was added in version 7.2. |
Set text <Select Text> into cell at row <Select Row Index> and column <Select Column Index> in Table <Select Table Index> of <Select Document Name> document |
Set Into Word Bookmarks And Save In A Specific Format |
--- |
Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves it to a target Word document in the specified format (DOC). The target document should be specified in full path format in the wordDocumentToSave parameter. Format should be specified in wordDocumentSaveFormat according to Microsoft WdSaveFormat enumeration. (This link was active at the time of this publication. It is not maintained by NICE.) If the specified format is not supported (for example, wdFormatDocumentDefault, that is DOCX for Microsoft Office Word 2007 - 2016), the document is saved in DOC format by default. |
Set Into <Word Document To Open> [<Textuals>, ...] at the specified [<Bookmarks>, ...] and save under <Word Document To Save> in format <Word Document Save Format> |
Set Values Into Word Document Bookmarks |
--- |
Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves the Word document. |
Set Into <MS Word Doc File Name To Open> <Textuals> At <Bookmarks List In Doc> And Save |
Set Values Into Word Document Bookmarks And Save |
--- |
Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves it to a target Word document in the wdFormatDocument format (DOC). |
Set Into <Word Document To Open> [<Textuals>, ...] at the specified [<Bookmarks>, ...] and save under <Word Document To Save> |
Set Values Into Word Document Bookmarks And Save |
--- |
Inserts the specified text values at the corresponding MS Word bookmarks in a given Word document (by its full name), and saves it to a target Word document in the wdFormatDocument format (DOC). |
Set Into <Word Document To Open> [<Textuals>, ...] at the specified [<Bookmarks>, ...] and save under <Word Document To Save> |